package com.soriya.nestlive.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.soriya.nestlive.entity.CategoryEntity;
import com.soriya.nestlive.entity.PageResult;
import com.soriya.nestlive.entity.param.CategoryListParam;
import com.soriya.nestlive.mapper.CategoryMapper;
import com.soriya.nestlive.service.CategoryService;
import org.springframework.stereotype.Service;

@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, CategoryEntity> implements CategoryService {
    @Override
    public PageResult<CategoryEntity> pageQuery(Page<CategoryEntity> page, CategoryListParam param) {
        LambdaQueryWrapper<CategoryEntity> wrapper = new LambdaQueryWrapper<>();
        page(page, wrapper);
        return PageResult.from(page);
    }
}
